package nc.nc_xiuxian;

import org.bukkit.entity.Player;

import java.io.IOException;
import java.util.HashMap;

import static nc.nc_xiuxian.NC_XIUXIAN.plugin;
import static nc.nc_xiuxian.NC_XIUXIAN.ywxs;

public class SHENGJISHUXING {
    public static void sjts(Player player) {
        HashMap<String,Double>playersx=plugin.playersx.get(player.getName());
        double sm = playersx.get("sm");
        double gj = playersx.get("gj");
        double fy = playersx.get("fy");
        double maxmp = playersx.get("maxmp");
        double fs = playersx.get("fs");
        double maxjq = playersx.get("maxjq");
        double maxjs = playersx.get("maxjs");
        double jj = playersx.get("jj");
        double xjj = playersx.get("xjj");
        double gf = playersx.get("gf");
        switch ((int) jj){
            case 0:
                switch ((int) xjj){
                    case 0:
                    case 1:
                    case 2:
                        sm=ywxs(sm+(((double)1/2)*gf));
                        gj=ywxs(gj+(((double)1/2)*gf));
                        fs=ywxs(fs+(((double)2/2)*gf));
                        fy=ywxs(fy+(((double)1/2)*gf));
                        maxjq=ywxs(maxjq+(((double)100/2)*gf));
                        maxmp=ywxs(maxmp+(((double)10/2)*gf));
                        maxjs=ywxs(maxjs+(((double)10/2)*gf));
                        break;
                    case 3:
                    case 4:
                    case 5:
                        sm=ywxs(sm+(((double)1/2)*gf));
                        gj=ywxs(gj+(((double)2/2)*gf));
                        fs=ywxs(fs+(((double)2/2)*gf));
                        fy=ywxs(fy+(((double)2/2)*gf));
                        maxjq=ywxs(maxjq+(((double)200/2)*gf));
                        maxmp=ywxs(maxmp+(((double)20/2)*gf));
                        maxjs=ywxs(maxjs+(((double)20/2)*gf));
                        break;
                    case 6:
                    case 7:
                    case 8:
                        sm=ywxs(sm+(((double)1/2)*gf));
                        gj=ywxs(gj+(((double)3/2)*gf));
                        fs=ywxs(fs+(((double)2/2)*gf));
                        fy=ywxs(fy+(((double)3/2)*gf));
                        maxjq=ywxs(maxjq+(((double)400/2)*gf));
                        maxmp=ywxs(maxmp+(((double)40/2)*gf));
                        maxjs=ywxs(maxjs+(((double)40/2)*gf));
                        break;
                    case 9:
                        sm=ywxs(sm+(((double)1/2)*gf));
                        gj=ywxs(gj+(((double)5/2)*gf));
                        fs=ywxs(fs+(((double)2/2)*gf));
                        fy=ywxs(fy+(((double)5/2)*gf));
                        maxjq=ywxs(maxjq+(((double)500/2)*gf));
                        maxmp=ywxs(maxmp+(((double)50/2)*gf));
                        maxjs=ywxs(maxjs+(((double)50/2)*gf));
                        break;

                }
                break;
            case 1:
                sm=ywxs(sm+(((double)5/2)*gf));
                gj=ywxs(gj+(((double)5/2)*gf));
                fs=ywxs(fs+(((double)5/2)*gf));
                fy=ywxs(fy+(((double)5/2)*gf));
                maxjq=ywxs(maxjq+(((double)500/2)*gf));
                maxmp=ywxs(maxmp+(((double)50/2)*gf));
                maxjs=ywxs(maxjs+(((double)50/2)*gf));
                break;
            case 2:
                sm=ywxs(sm+(((double)10/2)*gf));
                gj=ywxs(gj+(((double)10/2)*gf));
                fs=ywxs(fs+(((double)10/2)*gf));
                fy=ywxs(fy+(((double)10/2)*gf));
                maxjq=ywxs(maxjq+(((double)500/2)*gf));
                maxmp=ywxs(maxmp+(((double)50/2)*gf));
                maxjs=ywxs(maxjs+(((double)50/2)*gf));
                break;
            case 3:
                sm=ywxs(sm+(((double)20/2)*gf));
                gj=ywxs(gj+(((double)20/2)*gf));
                fs=ywxs(fs+(((double)20/2)*gf));
                fy=ywxs(fy+(((double)20/2)*gf));
                maxjq=ywxs(maxjq+(((double)500/2)*gf));
                maxmp=ywxs(maxmp+(((double)50/2)*gf));
                maxjs=ywxs(maxjs+(((double)50/2)*gf));
                break;
            case 4:
                sm=ywxs(sm+(((double)40/2)*gf));
                gj=ywxs(gj+(((double)40/2)*gf));
                fs=ywxs(fs+(((double)40/2)*gf));
                fy=ywxs(fy+(((double)40/2)*gf));
                maxjq=ywxs(maxjq+(((double)500/2)*gf));
                maxmp=ywxs(maxmp+(((double)50/2)*gf));
                maxjs=ywxs(maxjs+(((double)50/2)*gf));
                break;
            case 5:
                sm=ywxs(sm+(((double)100/2)*gf));
                gj=ywxs(gj+(((double)100/2)*gf));
                fs=ywxs(fs+(((double)100/2)*gf));
                fy=ywxs(fy+(((double)100/2)*gf));
                maxjq=ywxs(maxjq+(((double)1000/2)*gf));
                maxmp=ywxs(maxmp+(((double)100/2)*gf));
                maxjs=ywxs(maxjs+(((double)100/2)*gf));
                break;
            case 6:
                sm=ywxs(sm+(((double)500/2)*gf));
                gj=ywxs(gj+(((double)500/2)*gf));
                fs=ywxs(fs+(((double)500/2)*gf));
                fy=ywxs(fy+(((double)500/2)*gf));
                maxjq=ywxs(maxjq+(((double)1000/2)*gf));
                maxmp=ywxs(maxmp+(((double)100/2)*gf));
                maxjs=ywxs(maxjs+(((double)100/2)*gf));
                break;
            case 7:
                sm=ywxs(sm+(((double)1000/2)*gf));
                gj=ywxs(gj+(((double)1000/2)*gf));
                fs=ywxs(fs+(((double)1000/2)*gf));
                fy=ywxs(fy+(((double)1000/2)*gf));
                maxjq=ywxs(maxjq+(((double)1000/2)*gf));
                maxmp=ywxs(maxmp+(((double)100/2)*gf));
                maxjs=ywxs(maxjs+(((double)100/2)*gf));
                break;
            case 8:
                sm=ywxs(sm+(((double)2000/2)*gf));
                gj=ywxs(gj+(((double)2000/2)*gf));
                fs=ywxs(fs+(((double)2000/2)*gf));
                fy=ywxs(fy+(((double)2000/2)*gf));
                maxjq=ywxs(maxjq+(((double)1000/2)*gf));
                maxmp=ywxs(maxmp+(((double)100/2)*gf));
                maxjs=ywxs(maxjs+(((double)100/2)*gf));
                break;
        }
        playersx.put("sm",sm);
        playersx.put("gj",gj);
        playersx.put("fy",fy);
        playersx.put("maxmp",maxmp);
        playersx.put("fs",fs);
        playersx.put("maxjq",maxjq);
        playersx.put("maxjs",maxjs);
        plugin.playersx.put(player.getName(),playersx);
    }
}
